package org.dromara.wms.domain.bo;

import org.dromara.wms.domain.WmsProduct;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 产品管理业务对象 wms_product
 *
 * @author wenrui
 * @date 2024-03-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = WmsProduct.class, reverseConvertGenerate = false)
public class WmsProductBo extends BaseEntity {

  /**
   * 产品子id
   */
  @NotNull(message = "产品子id不能为空", groups = {EditGroup.class})
  private Long id;

  /**
   * 产品编码
   */
  @NotBlank(message = "产品编码不能为空", groups = {AddGroup.class, EditGroup.class})
  private String sku;

  /**
   * 产品名称
   */
  @NotBlank(message = "产品名称不能为空", groups = {AddGroup.class, EditGroup.class})
  private String name;

  /**
   * 产品规格
   */
  @NotBlank(message = "产品规格不能为空", groups = {AddGroup.class, EditGroup.class})
  private String specification;

  /**
   * 包装单位
   */
  @NotBlank(message = "包装单位不能为空", groups = {AddGroup.class, EditGroup.class})
  private String packingUnit;

  /**
   * 计量单位
   */
  @NotBlank(message = "计量单位不能为空", groups = {AddGroup.class, EditGroup.class})
  private String measureUnit;

  /**
   * 包装数量
   */
  @NotBlank(message = "包装数量不能为空", groups = {AddGroup.class, EditGroup.class})
  private String packingQuantity;

  /**
   * 价格
   */
  @NotNull(message = "价格不能为空", groups = {AddGroup.class, EditGroup.class})
  private BigDecimal price;

  /**
   * 采购价
   */
  private BigDecimal purchasePrice;

  /**
   * 类别
   */
  private String treeValue;

  /**
   * 产品属性
   */
  private String attrValue;

  /**
   * 产品状态
   */
  @NotBlank(message = "产品状态不能为空", groups = {AddGroup.class, EditGroup.class})
  private String status;

  /**
   * 是否库存
   */
  @NotBlank(message = "是否库存不能为空", groups = {AddGroup.class, EditGroup.class})
  private String isStock;

  /**
   * 可否销售
   */
  private String isSales;

  /**
   * 可否采购
   */
  private String isPurchase;

  /**
   * 可否生产
   */
  private String isProduce;

  /**
   * 是否物料
   */
  private String isMaterial;

  /**
   * 委外加工
   */
  private String isOutsource;

  /**
   * 最低库存
   */
  private BigDecimal minStock;

  /**
   * 最大库存
   */
  private BigDecimal maxStock;

  /**
   * 备注
   */
  private String remark;


}
